package logic

import (
	"context"
	"srv/models"

	"srv/house"
	"srv/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type HouseListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewHouseListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *HouseListLogic {
	return &HouseListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *HouseListLogic) HouseList(in *house.HouseListRequest) (*house.HouseListResponse, error) {
	// todo: add your logic here and delete this line
	var newHouse models.House
	houses := newHouse.ListHouse()
	return &house.HouseListResponse{
		List: houses,
	}, nil
}
